home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / FWPat.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  2.0 KB  |  83 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWPat.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWPAT_H
  11. #define FWPAT_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. #ifndef FWCOLOR_H
  18. #include "FWColor.h"
  19. #endif
  20.  
  21. #ifndef SLSHATTR_H
  22. #include "SLShAttr.h"
  23. #endif
  24.  
  25. #ifndef FWGRREF_H
  26. #include "FWGrRef.h"
  27. #endif
  28.  
  29. //========================================================================================
  30. //    Forward Declarations
  31. //========================================================================================
  32.  
  33. class FW_CReadableStream;
  34. class FW_CWritableStream;
  35.  
  36. //========================================================================================
  37. //    CLASS FW_CPattern
  38. //========================================================================================
  39.  
  40. class FW_CPattern : public FW_TGrRefPtr<FW_HPattern>
  41. {
  42. public:
  43.  
  44.     FW_DECLARE_AUTO(FW_CPattern)
  45.     
  46.     FW_CPattern();
  47.     ~FW_CPattern();
  48.     
  49.     FW_CPattern(FW_HPattern rep);
  50.     FW_CPattern(const FW_BitPattern& bits);
  51.     FW_CPattern(const FW_PixelPattern& pixels, short nbColors, const FW_CColor* colorTable);
  52.     FW_CPattern(FW_PlatformColorPattern pattern);
  53.  
  54.     FW_CPattern            Copy() const;
  55.  
  56.     FW_CPattern(const FW_CPattern& other);
  57.     FW_CPattern& operator=(const FW_CPattern& other);        
  58.  
  59.     FW_CPattern& operator=(const FW_BitPattern& bits);
  60.     
  61.     // ----- Delegation
  62.     
  63.     FW_Boolean                IsEqual(const FW_CPattern& pattern) const;
  64.         
  65.     long                    GetRefCount() const;
  66.  
  67.     void                    Invert();
  68.  
  69.     void                    FlipHorizontally();
  70.     void                    FlipVertically();
  71.     
  72.     void                    ShiftUp();
  73.     void                    ShiftDown();
  74.     void                    ShiftLeft();
  75.     void                    ShiftRight();
  76.  
  77.     friend FW_CReadableStream& operator>>(FW_CReadableStream& stream, FW_CPattern& pattern);
  78.     friend FW_CWritableStream& operator<<(FW_CWritableStream& stream, const FW_CPattern& pattern);
  79. };
  80.  
  81.  
  82. #endif
  83.